package cn.com.homeyoda.aimate.aihealth.ui.health.adapter;

import android.content.Context;

import androidx.annotation.NonNull;
import androidx.annotation.Nullable;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.wzq.mvvmsmart.utils.GlideLoadUtils;

import java.util.List;

import cn.com.homeyoda.aimate.aihealth.R;
import cn.com.homeyoda.aimate.aihealth.bean.MyselfPlanBean;


public class WeekCourseAdapter extends BaseQuickAdapter<MyselfPlanBean.DataBean.SubjectListBean, BaseViewHolder> {


    public WeekCourseAdapter(int layoutResId, @Nullable List<MyselfPlanBean.DataBean.SubjectListBean> data, Context context) {
        super(layoutResId, data);
        mContext = context;
    }

    @Override
    protected void convert(@NonNull BaseViewHolder helper, MyselfPlanBean.DataBean.SubjectListBean item) {
        helper.setText(R.id.tv_couse_name, item.getName());
        helper.setText(R.id.tv_couse_time,"运动时长"+item.getHoldTime()+"分钟");
        GlideLoadUtils.loadImg(helper.getView(R.id.iv_background),item.getIcon(),R.mipmap.bg_sport_def);
    }

}
